package com.gper.edu.vip.designer.dependence.inversion;

import com.gper.edu.vip.designer.openclose.ICourse;

/**
 * @Author: ellis.guan
 * @Description:
 * @Date: 2020/2/28 21:43
 * @Version: 1.0
 */
public class Ellis implements Person{

    private ICourse course;
    //构造器注入
    public Ellis(ICourse course){
        this.course = course;
    }

    @Override
    public String getName() {
        return "ellis";
    }

    public String getInterestCourse(){
        return getName()+" love "+this.course.getName();
    }
}
